import axios from 'axios'
import base from '@/utils/config/base'

// 统计报告总计
export const getOverall = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getOverall',
    method: 'get',
    params: params
  })
}
// 年龄段分布统计
export const getPatientAgeQty = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getPatientAgeQty',
    method: 'get',
    params: params
  })
}
// 性别分布统计
export const getPatientSexQty = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getPatientSexQty',
    method: 'get',
    params: params
  })
}
// 检验结果分布统计
export const getResultQty = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getResultQty',
    method: 'get',
    params: params
  })
}
// 阳性结果分布统计
export const getResultAbnormalQty = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getResultAbnormalQty',
    method: 'get',
    params: params
  })
}
// 各年龄段检验结果分布
export const getAgeResultQty = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getAgeResultQty',
    method: 'get',
    params: params
  })
}
// 不同性别检验结果分布
export const getSexResultQty = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getSexResultQty',
    method: 'get',
    params: params
  })
}
// 项目类型报告数量
export const getProjectQty = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getProjectQty',
    method: 'get',
    params: params
  })
}

// 项目点报告数量
export const getOrganProjectQty = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getOrganProjectQty',
    method: 'get',
    params: params
  })
}
// 国家项目-审核通过率
export const getAuditQty = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getAuditQty',
    method: 'get',
    params: params
  })
}
// 国家项目-审核工作量分布
export const getAuditOrganProjectQty = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getAuditOrganProjectQty',
    method: 'get',
    params: params
  })
}
// 非项目-报告有效率
export const getValidQty = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getValidQty',
    method: 'get',
    params: params
  })
}
// 非项目-报告工作量
export const getDeviceProjectQty = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getDeviceProjectQty',
    method: 'get',
    params: params
  })
}
// 非项目-无效原因分析
export const getInvalidReason = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getInvalidReason',
    method: 'get',
    params: params
  })
}

// 取得用户项目点名称列表接口
export const getUserOrganNameList = function(params) {
  return axios({
    url: base.statistic + '/statistic2/getUserOrganNameList',
    method: 'get',
    params: params
  })
}

// 取得用户项目名称列表接口
export const getUserProjectNameList = function(uname) {
  return axios({
    url: base.statistic + `/statistic2/getUserProjectNameList?uname=${uname}`,
    method: 'get',
  })
}